<template>
    <div class="content">
        <el-table
                :data="tableData"
                border
                style="width: 100%">
            <el-table-column
                    prop="username"
                    label="评论的小说名"
                    width="150px">
            </el-table-column>
            <el-table-column
                prop="bookName"
                label="评论的小说名"
                width="150px">
        </el-table-column>
            <el-table-column
                    prop="comment"
                    label="评论"
                    width="500px">
            </el-table-column>
        </el-table>
    </div>
</template>
<script>
    export default {
        data: function () {
            return {
                tableData: []
            }
        },
        methods: {

        },
        created (){
            console.log(this.$store.state.userId);
            let userId = this.$store.state.userId;
            this.$http.get('http://localhost/api/checkViolations/' +userId.userId).then(function (result) {
                this.tableData = result.body;
            });
        }
    }
</script>
<style scoped>
    .content{
        width: 863px;
        padding:20px 40px 0 20px;
    }
</style>